﻿<!doctype html>
<html>
<!-- InstanceBegin template="/Templates/template1.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta charset="utf-8">
<title>产品信息</title>
<script type="text/javascript" src="../js/common.js"></script>
<script type="text/javascript" src="../js/jquery.pager.js"></script>
<link href="../css/Pager.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../js/utils.js"></script>
<script type="text/javascript" src="../js/formValidator.js"></script>
<script type="text/javascript" src="../js/formValidatorRegex.js"></script>
<link href="../css/validator3.css" type="text/css" rel="stylesheet" />
<link href="../css/style.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../js/checkLogin.js"></script>
<script type="text/javascript" src="../js/find.js"></script>
<!-- InstanceBeginEditable name="EditRegion3" -->
<script type="text/javascript" src="../js/doubleDate2.0.js"></script>
<script type="text/javascript">

/*全局状态变量*/
var _pageIndex=1;	//当前页码，默认为 0
var _pageSize=5; 	//每页显示记录数量，还未使用
var _flag=0;		//标识当前是更新还是添加，0标示添加，1标示更新
var pagecount = 0;	//copy
var count = 0;		//copy
var shopId="shopId";//copy
var shopPageCount=0;//copy
var shopCount=0;	//copy
var pageIndex=0;	//copy

/**
 * 入口，和服务器的通信从此开始
 */
$(function() {
	initPage();	//初始化页面
	refreshInput($(".serWrapper"));
	addMargin($("#window1"));
});

/**
 * 初始化页面，只在页面加载完成后执行一次
 */
function initPage() {
	//加载第一页数据
	_pageIndex = 1;
	//初始化日期选择控件
	$('.doubledate').kuiDate({
		className:'doubledate',
		isDisabled: "0"  // isDisabled为可选参数，“0”表示今日之前不可选，“1”标志今日之前可选
	});
	//绑定事件
	$("#addColumn").bind('click',toAdd);
	//初始化 添加或者更新面板
	initAddOfUpdatePanel();
	
	//细节初始化

	
	//初始化校验
	//initCheck();
	
	//请求第一页数据
	//getRecommendShopList(_pageIndex);
}


/**
 * 向服务器查询推荐店铺列表（分页）
 */
 function InitTable() {
		var code=$("#code").val().replace(/\s/gi,'');
		var name=$("#name").val().replace(/\s/gi,'');
		var barCode=$("#barCode").val().replace(/\s/gi,'');
		var status=$("#status").val();
		var isWx= $("#searchStatus").val()
		//var name=$("#name").val().replace(/\s/gi,'');
		var shopId="";
		var param={'code':code,'name':name,'status':status,'barCode':barCode,'isWx':isWx}
			shopId=$("#shopNames").val();
			if(shopId!=""&&shopId!=null){
				param={'code':code,'name':name,'status':status,'barCode':barCode,'isWx':isWx,'shopId':shopId}
			}
		$.ajax({
			type : "get",
			async:false,
			data :param,
			datatype : "json",
			url : "../goods/find/goodsList/" + (_pageIndex -1) + "/10",
			success : function(data) {
				var dt = JSON.parse(data);
						if(IsEmpty(dt)){
							art.dialog({fixed:true, lock: true,content:"查询出錯",icon:'error',ok:true});	
							return false;
							}
							if(dt.state==0){
								$("#memberList tbody tr").remove();
								 DealAndShowMsg(data,false,true);
								 addDataTOtable(pageIndex, dt, "memberList")								

								if(dt.result.len > 0){
									 var shu = dt.result.len;
								 	 pagecount = Math.ceil(shu/10);
								 	 $("#NoResult").hide();
								}else{
									$("#NoResult").show();
									pagecount=0;

								}
								 	$("#sup").html("共"+dt.result.len+"条");	
								 $("#pager").pager({ pagenumber: _pageIndex, pagecount: pagecount, buttonClickCallback: PageClick });
		
							}else if(dt.state==1){
								art.dialog({fixed:true, lock: true,content:dt.msg,icon:'error',ok:true});	
							}else{
								checkStateShowErrorMsgAndDealResult(data);
							}					
						
			}	
		});		
		
	}

/**
 * 为查找做准备，这里主要是生成查询条件对象
 */
function toSearch(){
	InitTable()
}

/**
 * 当用户点击了查询按钮调用函数
 */
function doSearch(pageIndex, conditions) {
	//发送 POST 请求
	$.post('../recommendShop/find/list/'+(pageIndex-1)+'/5', conditions, function(json) {
		addDataTOtable(_pageIndex, json, 'memberList');
		searchPaginate(pageIndex, json.result.len, _pageSize, 'pager', conditions);
		$('#effectDate').val('');
		$('#uneffectDate').val('');
		$('#searchStatus').val('');
	}, 'json');
}


/**
 * 将数据添加到表单,接受从查询数据返回的报文，将其添加指定的表单上。
 */
function addDataTOtable(pageIndex, json, tableId) {
	//拿到添加数据的目的地
	var $Table = $('table[id=' + tableId + ']');
	//清除原有数据
	$('table[id=' + tableId + '] > tbody').remove();
	var $Tbody = $('<tbody></tbody>');
	$Table.append($Tbody);
	//获取数据，二维数组
	var data = json.result.data;
	//获取行
	var row = json.result.data.length;
	//获取列
	var col = json.result.head.length;
	//将数据添加到表单中
	//id,shopId,imageURL,shopName,effectDate,uneffectDate,status
	for ( var i = 0; i < row; i++) {
		var $Tr = $('<tr></tr>');
		var id = getHeadIndexValue(i,json,'id');
		var $Td1 = $('<td><img src="'+getHtmlString(getHeadIndexValue(i,json,'imageURL'))+'"></img></td>');
		var $Td2 = $('<td>' + getHtmlString(getHeadIndexValue(i,json,'code')) + '</td>');
		var $Td3 = $('<td>' + getHtmlString(getHeadIndexValue(i,json,'name')) + '</td>');
		var $Td4 = $('<td>' + getHtmlString(getHeadIndexValue(i,json,'mode')) + '</td>');
		var $Td6 = $('<td>' + getHtmlString(getHeadIndexValue(i,json,'barCode')) + '</td>');
		var $Td7 = $('<td>' + getHtmlString(getHeadIndexValue(i,json,'origin')) + '</td>');
		var $Td8 = $('<td>' +  getHtmlString(getHeadIndexValue(i,json,'supName')) + '</td>');
		var $Td9 = $('<td>' + getHtmlString(getHeadIndexValue(i,json,'srhCode')) + '</td>');
		var $Td10 = $('<td>' + getHtmlString(getHeadIndexValue(i,json,'Attr')) + '</td>');
		var $Td11 = $('<td>' + getHtmlString(getHeadIndexValue(i,json,'isWx') )+ '</td>');
		var $Td12 = $('<td>' + getHtmlString(getHeadIndexValue(i,json,'SalePrice')) + '</td>');
		var $Td13 = $('<td>' + getHtmlString(getHeadIndexValue(i,json,'staName')) + '</td>');
		
		var $Td14 = "<td><input class='common_btn' type='button' onclick='toUpdate("
				+ id
				+ ")' value='修改'> </br><input class='del common_btn' type='button' onclick='toDelete("
				+ id + ")' value='删除'></br><input class='check_btn common_btn' type='button' onclick='toPromPrice("
				+ id + ")' value='促销价格'> </td>"

		$Tr.append($Td1);
		$Tr.append($Td2);
		$Tr.append($Td3);
		$Tr.append($Td4);
		$Tr.append($Td6);
		$Tr.append($Td7);
		$Tr.append($Td8);
		$Tr.append($Td9);
		$Tr.append($Td10);
		$Tr.append($Td11);
		$Tr.append($Td12);
		$Tr.append($Td13);
		$Tr.append($Td14);
		$Tbody.append($Tr);
	}
	$('#sup').html('共 '+json.result.len+' 条');
}

function toPromPrice(id){
	window.location.href="setProductPrice.html?goodsId="+id
}


/**
 * 处理分页，需要传入当前页，总记录数,每页显示记录数目，和要显示分页的div 的id值.
 */
 function paginate(currentIndex, recordCount, pageSize, panelId) {
	var pageCount = Math.ceil(recordCount / pageSize);
	$("#" + panelId).pager({
		pagenumber : _pageIndex,
		pagecount : pageCount,
		buttonClickCallback : function(pageclickednumber) {
			_pageIndex = pageclickednumber;
			InitTable();
		}
	});
}

 /**
  * 处理分页显示查找的结果，需要传入当前页，总记录数,每页显示记录数目，和要显示分页的div 的id值.
  * 这里最重要的一点是，如何保存查找的信息
  */
  function searchPaginate(currentIndex, recordCount, pageSize, panelId, conditions) {
 	var pageCount = Math.ceil(recordCount / pageSize);
 	$("#" + panelId).pager({
 		pagenumber : currentIndex,
 		pagecount : pageCount,
 		buttonClickCallback : function(pageclickednumber) {
 			alert(pageclickednumber)
 			_pageIndex = pageclickednumber;
 			InitTable()
 		}
 	});
 }


/**
 * 更新或者删除，根据 符号 _flag 来选择
 */
function doAddOrUpdate(){	
	if(_flag===0) doAdd();
	else doUpdate();
}
/**
 * 添加一条记录
 */
function doAdd(){
	//获取表单数据
	var shopId=$('#shopName2').val();
	var content=$('#rcontent').val();
	var effectDate=$('#dtBegin').val();
	var uneffectDate=$('#dtEnd').val();
	var status=$('#status').val();

	if(IsEmpty(shopId)){
		art.dialog({fixed:true, lock: true,content:"推荐店面不能为空！",icon:'error',ok:true});	
		return;
	}
	if(IsEmpty(effectDate)){
		art.dialog({fixed:true, lock: true,content:"生效日期不能为空！",icon:'error',ok:true});	
		return;
	}
	if(IsEmpty(uneffectDate)){
		art.dialog({fixed:true, lock: true,content:"失效日期不能为空！",icon:'error',ok:true});	
		return;
	}
	if(!(status==='0' || status==='1')){
		art.dialog({fixed:true, lock: true,content:"请选择正确的状态！",icon:'error',ok:true});	
		return;
	}
	
	//创建 建议商铺 对象
	var recommend = {
		'shopId':shopId,
		'content':content,
		'effectDate':effectDate,
		'uneffectDate':uneffectDate,
		'status':status
	};
	//创建报文
	var message = {
		'head':['shopId','content','effectDate','uneffectDate','status'],
		'data':[shopId, content, effectDate, uneffectDate, status]
	};
	//转变变为字符串
	var messageData = JSON.stringify(message);
	//发送请求
	$("#close_this").attr("disabled",true);
	$.post("../recommendShop/insert", {
		"data" : messageData
	}, function(data) {
		$("#close_this").attr("disabled",false);

		 if(IsEmpty(data)){
				art.dialog({fixed:true, lock: true,content:"添加出错",icon:'error',ok:true});	
				return false;
				}
				if(data.state==0){
					artAlert('添加成功！');
					$("#yinying1,#window_change").hide();
					_pageInde=1;
					getRecommendShopList(1);
					}else if(data.state==1){
							artError('添加失败！'+data.msg);
				}else{
					checkStateShowErrorMsgAndDealResult(data);
				}
	
	},'json');
}
/**
 * 更新一条记录
 */
function doUpdate(){
	//获取表单数据
	var id=$("#updateId").val();
	var shopId=$('#shopName2').val();
	var effectDate=$('#dtBegin').val();
	var uneffectDate=$('#dtEnd').val();
	var content=$('#rcontent').val();
	var status=$('#status').val();
	
	if(IsEmpty(id)){
		alert('修改不能为空！');
		return;
	}
	
	if(IsEmpty(shopId)){
		art.dialog({fixed:true, lock: true,content:"推荐店面不能为空！",icon:'error',ok:true});	
		return;
	}
	if(IsEmpty(effectDate)){
		art.dialog({fixed:true, lock: true,content:"生效日期不能为空！",icon:'error',ok:true});	
		return;
	}
	if(IsEmpty(uneffectDate)){
		art.dialog({fixed:true, lock: true,content:"失效日期不能为空！",icon:'error',ok:true});	
		return;
	}
	if(!(status==='0' || status==='1')){
		art.dialog({fixed:true, lock: true,content:"请选择正确的状态！",icon:'error',ok:true});	
		return;
	}
	
	//创建报文
	var message = {
		'head':['shopId','effectDate','uneffectDate','content','status','id'],
		'data':[ shopId, effectDate, uneffectDate,content, status,id]
	};
	//转变变为字符串
	var messageData = JSON.stringify(message);
	//发送请求
	$("#close_this").attr("disabled",true);
	$.post("../recommendShop/update", {
		"data" : messageData
	}, function(data) {
		$("#close_this").attr("disabled",false);
		var reDate=JSON.stringify(data);
	
		 if(IsEmpty(data)){
				art.dialog({fixed:true, lock: true,content:"添加出错",icon:'error',ok:true});	
				return false;
				}
				if(data.state==0){
					artAlert('更新成功！');
					$("#yinying1,#window_change").hide();
					_pageInde=1;
					getRecommendShopList(1);
					 }else if(data.state==1){
							artError('更新失败！ '+data.msg);
				}else{
					checkStateShowErrorMsgAndDealResult(data);
				}
	
	},'json');
}

function toAdd(){
	window.location.href="addGoods.html?menu="+getIdByName("menu")+"&submenu="+getIdByName("submenu");

/* 	resetForm();
	$("#doflag").val(1)
	$("#content,#yinying1").show(); */

}

/**
 * 删除一行
 */
function toDelete(id){
	if(IsEmpty(id)){
		artAlert('删除的内容不能为空！');
		return;
	}
	//提示用户 确认删除
	art.dialog({
		fixed:true,
		lock: true,
		icon:'question',
		'title':'警告',
		'content':'确定要删除吗？',
		'cancel':function(){},
		'ok':function(){
			$.post('../goods/del/deleteInfo',{
				'id':id
			},function(message){
				if(IsEmpty(message)){
					art.dialog({fixed:true, lock: true,content:"删除出错",icon:'error',ok:true});	
					return false;
					}
					if(message.state==0){
						artSuccess('删除成功');
							InitTable();
						}else if(message.state==1){
							 art.dialog({
									'title':'删除失败',
									'content':message.msg,
									'ok':function(){}
								});
					}else{
						checkStateShowErrorMsgAndDealResult(message);
					}
		
				
				
				
				
			},'json');
		}
	});

	//直接发出请求
}


/**
 * 初始化 添加或者更新面板的样式
 */
function initAddOfUpdatePanel(){
	addMargin($("#window_change"));
	
	$("#memberList tbody tr").each(function() {
      $(this).children("td:last").children("input").eq(0).click(function(){
			$("#yinying1,#window_change").show();	
		})
    });
	
	$("#closeThe").click(function(){
		$("#yinying1,#window_change").hide();
	})
	
	$(".to_update").live("click",function(){
		
		$("#doflag").val(1);
		var shopName=$(this).parents("tr").children("td").eq(0).html();
		var shopId=$(this).next().val();
		var status=$(this).prev().val();
		var id=$(this).attr("id");
		var dtBigin=$(this).parents("tr").children("td").eq(5).html();
		var dtEnd=$(this).parents("tr").children("td").eq(6).html()
		
		
		$("#shopName2").append("<option value='"+shopId+"'>"+shopName+"</option>");
		$("#shopName2").val(shopId);
		$("#dtBegin").val(dtBigin);
		$("#dtEnd").val(dtEnd);
		$("#updateId").val(id);
		$("#status").val(status);
		$("#defaultCflag").val(couponFlag);
		$("#close_this").attr("disabled",false)
		$("#yinying1,#window_change").show();	
	})
}

/**
 * 显示商铺选择列表
 */
function showShopList(flag) {
	$("#shopflag").val(flag);
	if (flag == 0) {

		$("#shopIsChoosed").attr("checked", "checked");
		$("#shopNames").blur();
	} else {
		$("#shopName2").blur();

	}
	$("#shopShow,#yinying").show();
	addMargin($("#shopShow"));
	InitShopList(1);
}

/**
 * 关闭 添加或更新面板
 */
function closeShopShow(){
	$("#shopShow,#yinying").hide();
	$("#searchName").val("")
}

/**
 * 加载商铺列表数据
 */
 function InitShopList(page){

	if(IsNotEmpty(page)){
		_supplierPageIndex = page
	}
	_supplierJson= _findInfo("../supplier/find/supplierList/" + ( _supplierPageIndex - 1) + "/5", null);
					if(_supplierJson.state==0){
						var params = new Array("id", "name");
						_loadInfoOfChoose(_supplierJson, "shopList", "chooseSupplier", params, "id")
						_loadPage("shopPager", _supplierPageIndex, 5, _supplierJson, InitShopList)
						
						 addMargin($("#shopShow"));	
						 }
					
}

function chooseSupplier(id){
	for ( var i = 0; i < _supplierJson.result.data.length; i++) {
		var ids= _getIntOfJson(i, _supplierJson, "id")
		if(id==ids){
			var htm="<option value='"+_getStringOfJson(i, _supplierJson, "id")+"'>"+_getStringOfJson(i, _supplierJson, "name")+"</option>";
			$("#shopNames").html(htm);
		}
	}
	$("#shopShow,#yinying").hide();

}


 /**
  * 加载 商铺列表，拷贝
  */
function initShopTable(json){
	if(json!=null && json.state==0){
		var params = new Array("id", "name","mp");
		LoadShoptable(json,params,"shopList");
	}
}

/**
 * 加载 商铺列表，拷贝
 */
function LoadShoptable(json, params, tableId){
	var phArray = new Array();
	var count = 0;
	if (params != null) {
		$(params).each(function(pIndex, pData) {
			$.each(json.result.head, function(hIndex, hData) {
				if (pData == hData) {
					phArray[count++] = hIndex;
				}
			});
		});
	}
	if (json.result.data != null) {
		$.each(json.result.data, function(index, dt) {
			$("table[id='" + tableId + "']").append("<tr></tr>");
			$(phArray).each(function(phIndex, data) {
				$.each($(dt), function(dtIndex, d) {
					if (dtIndex == data) {
						$("table[id='" + tableId + "'] tr:last").append("<td>" +  (d === null||d=="null" ? " " : d) + "</td>");
					}
				});
			});
		});
	}
}

/**
 * 商铺分页
 */
function PageClick(pageclickednumber) {
	_pageIndex=pageclickednumber;
	InitTable();
}



/**
 * 商铺分页，拷贝
 */
 function bclicks(obj){
	var $first=obj.parent("td").parent("tr").children("td:first");
	var id=$first.html();
	var name=$first.next().html();
	//$("#shopName").children("option").blur();
	getParamToshopS(id,name)
}
 /**
  * 商铺分页，拷贝
  */
function getParamToshopS(id,name){
	var shopflag=$("#shopflag").val();
	var htm="<option value='"+id+"'>"+name+"</option>";
	if(shopflag==0){
		
	$("#shopNames").html("");
	$("#shopNames").html(htm);
	$("#shopNames").val(id);
	}else{
		$("#shopName2").html("");
		$("#shopName2").html(htm);
		$("#shopName2").val(id);
	}
	closeShopShow();
}
/**
 * 商铺分页，拷贝
 */
function closeShopShow(){
	$("#shopShow,#yinying").hide();
	$("#searchName").val("")
}

function toUpdate(id){
	window.location.href='updateGoods.html?id='+id+"&menu="+getIdByName("menu")+"&submenu="+getIdByName("submenu");
}
</script>
</head>
<body>
	<div id="yinying"></div>
	<div id="yinying1"></div>
	<!-- 商品大类-->
<div class="hideDiv hideOver" id="window1">
 <div class="closeTop"><span class="closeThe" onclick="closeParent($(this))"><img src="../images/close.png"></span></div>
	<table id="provinceList" width="100%" cellspacing="1" cellpadding="0" border="0" class="member_list">
    	<thead>
    	<tr>
        	<th>商品大类</th>
        	<th>操作</th>
        	<th>商品大类</th>
        	<th>操作</th>
        	<th>商品大类</th>
        	<th>操作</th>
        	<th>商品大类</th>
        	<th>操作</th>
        </tr>
        </thead>
        <tbody>
        	
        </tbody>
    </table>
</div>
	<!-- 添加或者更新 推荐的表单 -->
	<form id="valiForm">
		<div id="window_change" class="member_search hideDiv">
			<div class="closeTop">
				<span id="closeThe"><img src="../images/close.png"></span>
			</div>
			<input type="hidden" id="doflag"> <input type="hidden"
				id="shopflag"> <input type="hidden" id="defaultCflag">
			<input type="hidden" id="updateId">
			<p>
				<label><span>供应商：</span> <select id="shopName2"
					onclick="showShopList('2')">
				</select> </label>
				<label><span>商品名称：</span> <input type="text" ></label>
			</p>
			<p>
				<label><span>商品编码：</span> <input type="text" ></label>
				<label><span>商品条码：</span> <input type="text" ></label>
			</p>
			<p>
				<label><span>建议售价/元：</span> <input type="text" ></label>
				<label><span>商品大类：</span> <input type="text" onclick="showHideDiv('window1');" ></label>
			</p>
			<p>
				<label><span>微信相关：</span>
					<select>
						<option value="0">正常</option>
						<option value="1">非正常</option>
				</select> </label>
				<label><span>状态：</span>
					<select id="statusfe">
						<option value="0">正常</option>
						<option value="1">非正常</option>
				</select> </label>
			</p>
			<div class="submit_btn">
				<input type="button" onclick="doAddOrUpdate()" value="保存信息"
					class="common_btn" id="close_this">
			</div>
		</div>
	</form>
	
	<!-- 选择 商铺名称的列表 -->
	<div id="shopShow" class="hideDiv">
		<div
			style="float: right; margin-bottom: 5px; width: 20px; height: 20px; line-height: 20px; text-align: center; background-color: #eee; margin-bottom: 5px; border: 1px solid #ccc;">
			<span style="cursor: pointer; font-size: 14px;"
				onclick="closeShopShow();">X</span>
		</div>
		<div class="bottom_search">
			<div class="serWrapper"><input type="text" id="searchName" class="txt"><strong class="refresh" onclick="$('#searchName').val('')">清空</strong></div> <input type="button"
				style="width: auto; margin-left: 5px;" value="查询"
				onclick="search2()" class="common_btn">
		</div>
		<table id="shopList" cellpadding="4" cellspacing="0" border="1"
			width="100%">
			<thead>
				<tr>
					<th>供应商ID</th>
					<th>供应商名称</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody></tbody>
		</table>
		<div id="shopPager"></div>
	</div>
	
	<!-- 页面列表 -->
	<div class="container" id="container">
		<div class="container_R fr">
			<div class="place">产品信息</div>
			<div class="member_search">
				<p> <span>
					  供应商：
					</span> <select id="shopNames" onclick="showShopList('0')"
						style="height: 20px;" >
					</select> <span>商品编码：</span> <input type="text" id="code"/> <span>商品名称：</span>
					<input type="text" id="name" />

				</p>
				<p>
					<span>商品条码</span>
					<input type="text" id="barCode" />
					<span>状态：</span> <select id="status">
						<option value="">所有</option>
						<option value="0">未启用</option>
						<option value="1">启用</option>
						<option value="-1">禁止使用</option>
					</select>
					<span>微信相关：</span> <select id="searchStatus">
						<option value="">所有</option>
						<option value="0">不相关</option>
						<option value="1">相关</option>
					</select>  <input type="button" value="查询" class="btn" onclick="toSearch()">
				</p>
			</div>
			<table width="100%" class="member_list" cellpadding="0"
				cellspacing="1" border="0" id="memberList">
				<caption>
					<strong>产品列表 <span id="sup">共0条</span></strong><input type="button" class="common_btn" value="增加" id="addColumn">
				</caption>
				<thead>
					<tr>
						<th >品牌图</th>
						<th >商品编码</th>
						<th >商品名称</th>
						<th >规格型号</th>
						<th >条码</th>
						<th >产地</th>
						<th>供应商</th>
						<th >检索码</th>
						<th >商品属性</th>
						<th >微信相关</th>
						<th >建议售价</th>
						<th >状态</th>
						<th>操作</th>
					</tr>
				</thead>
			</table>
			<div id="pager" style="float: right;"></div>
		</div>
		<div class="fc"></div>
	</div>
	
	<!-- InstanceEndEditable -->
	<script type="text/javascript" src="../js/header.js"></script>
	<script type="text/javascript" src="../js/left.js"></script>
	<script type="text/javascript" src="../js/footer.js"></script>
	<script type="text/javascript">
		showTab(2, 3);
	</script>
</body>
<!-- InstanceEnd -->
</html>
